import request from '@/utils/request'

export function fetchCountList(params) {
  return request({
    url:'/crm/agent/countList',
    method:'get',
    params:params
  })
}

export function fetchList(params) {
  return request({
    url:'/crm/agent/list',
    method:'get',
    params:params
  })
}

export function createAgent(data) {
  return request({
    url:'/crm/agent/save',
    method:'post',
    data:data
  })
}

export function updateAgent(data) {
  return request({
    url:'/crm/agent/update',
    method:'post',
    data:data
  })
}

export function getAgentBaseInfo(params) {
  console.log(params,33344)
  return request({
    url:'/crm/agent/getAgentBaseInfo',
    method:'get',
    params:params
  })
}

export function getAgentOrderList(params) {
  console.log(params,55555)
  return request({
    url:'/crm/agent/getAgentOrderList',
    method:'get',
    params:params
  })
}

export function fetchSimpleList(params) {
  return request({
    url:'/product/simpleList',
    method:'get',
    params:params
  })
}

export function updateDeleteStatus(params) {
  return request({
    url:'/product/update/deleteStatus',
    method:'post',
    params:params
  })
}

export function updateNewStatus(params) {
  return request({
    url:'/product/update/newStatus',
    method:'post',
    params:params
  })
}

export function updateRecommendStatus(params) {
  return request({
    url:'/product/update/recommendStatus',
    method:'post',
    params:params
  })
}

export function updatePublishStatus(params) {
  return request({
    url:'/product/update/publishStatus',
    method:'post',
    params:params
  })
}



export function getProduct(id) {
  return request({
    url:'/product/updateInfo/'+id,
    method:'get',
  })
}

